cmake_minimum_required(VERSION 3.7)
project(serialmod)

set(CMAKE_CXX_STANDARD 11)
if(buildsw)
	message("---------------cross tool---------------------")
	set(CMAKE_FIND_ROOT_PATH ${USR_FIND_ROOT} )
	set(CMAKE_CXX_COMPILER ${USR_CXX_COMPILER} )
endif()

set(SRC_DIR_USER ./)
set(INC_DIR_USER ../../inc/sys/)
set(SOURCE_FILES serialMod.cpp)

if (buildsw)
	set(LIBRARY_OUTPUT_PATH   ../../../bin/mipi)
	link_directories(
			../../lib/bin/mipi
			../../bin/mipi)
else(NOT buildsw)
	set(LIBRARY_OUTPUT_PATH   ../../../bin/gcc)
	link_directories(
			../../lib/bin/gcc
			../../bin/gcc)
endif ()

include_directories(
        ../../lib/inc/
        ../../inc/)

add_library(serialmod SHARED ${SOURCE_FILES})
target_link_libraries(serialmod bsys daqsys)
